﻿//创建时间: 2010-11-22
//创建作者: 李晓忠
//功能说明: CMS系统 扩展功能 
//修改: 2010-11-22 李晓忠 添加结点首页查看
using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TRPOP.CMS.Web.UI;

using TRPOP.CMS.Model;
using TRPOP.CMS.Business;
using TRPOP.Common;

namespace TRPOP.CMS.Web.Admin
{
    public partial class admin_extrapublish : BaseAdmin
    {

        #region 页面变量
        protected string m_strAction = "";
        protected int m_intNodeId = 0;
        protected int m_intPublishID = 0;
        protected int m_intContentId = 0;
        #endregion

        #region 页面事件
        protected void Page_Load(object sender, EventArgs e)
        {
            m_strAction = RequestHelper.RequestString("ac").ToLower();
            m_intNodeId = RequestHelper.RequestInt("nodeid");
            m_intPublishID = RequestHelper.RequestInt("PublishID");//附加发布id
            m_intContentId = RequestHelper.RequestInt("contentid");//基表信息id
            if (!IsPostBack)
            {
                LoadBase();
                BindData();
            }
        }
        #endregion

        #region 页面方法

        void LoadBase()
        { 
        
        }

        void BindData()
        {
            if (m_strAction == "viewindex")
            {
                if (m_intNodeId > 0)
                {
                    //NodeInfo m_NodeInfo = (new NodeManage()).GetNodeIndexPage(m_intNodeId);
                    //if (m_NodeInfo != null)
                    {
                        base.Redirect((new NodeManage()).GetNodeIndexPage(m_intNodeId));
                    }
                }
                else
                {
                    string strURL = SYSConfig.SystemVar_SiteURL;
                    if (strURL.LastIndexOf("/") == strURL.Length-1)
                    {
                        strURL = strURL + SYSConfig.SystemVar_IndexPageName;
                    }
                    else
                    {
                       strURL= SYSConfig.SystemVar_SiteURL + "/" + SYSConfig.SystemVar_IndexPageName;
                    }
                    base.Redirect(strURL);
                }
            }
        }
        #endregion
    }
}
